package com.zyl.edthresholdtraining.mapper;

import com.zyl.edthresholdtraining.entity.UserTestResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zyl.edthresholdtraining.vo.UserTestResultVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * InnoDB free: 48128 kB Mapper 接口
 * </p>
 *
 * @author zhangyulu
 * @since 2020-07-31
 */
public interface UserTestResultMapper extends BaseMapper<UserTestResult> {

    @Select(" select avg(right_rate) avgRightRate,avg(avg_time) avgTime from t_user_test_result " +
            " where time_partition_uuid = #{timePartitionUuid}")
    UserTestResultVO getUserTestResultVO(@Param("timePartitionUuid") String timePartitionUuid);

}
